Optimal. Leaf size=109 \[ -\frac {2 b^2 d n^2}{27 x^3}-\frac {b^2 e n^2}{4 x^2}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {b e n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2395, 2342,
2341} \begin {gather*} -\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {b e n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {2 b^2 d n^2}{27 x^3}-\frac {b^2 e n^2}{4 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2341
Rule 2342
Rule 2395
Rubi steps
\begin {align*} \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx &=\int \left (\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{x^4}+\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{x^3}\right ) \, dx\\ &=d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx+e \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx\\ &=-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}+\frac {1}{3} (2 b d n) \int \frac {a+b \log \left (c x^n\right )}{x^4} \, dx+(b e n) \int \frac {a+b \log \left (c x^n\right )}{x^3} \, dx\\ &=-\frac {2 b^2 d n^2}{27 x^3}-\frac {b^2 e n^2}{4 x^2}-\frac {2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac {b e n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 82, normalized size = 0.75 \begin {gather*} -\frac {36 d \left (a+b \log \left (c x^n\right )\right )^2+54 e x \left (a+b \log \left (c x^n\right )\right )^2+27 b e n x \left (2 a+b n+2 b \log \left (c x^n\right )\right )+8 b d n \left (3 a+b n+3 b \log \left (c x^n\right )\right )}{108 x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.11, size = 1486, normalized size = 13.63
method | result | size |
risch | \(\text {Expression too large to display}\) | \(1486\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 156, normalized size = 1.43 \begin {gather*} -\frac {2}{27} \, b^{2} d {\left (\frac {n^{2}}{x^{3}} + \frac {3 \, n \log \left (c x^{n}\right )}{x^{3}}\right )} - \frac {1}{4} \, b^{2} {\left (\frac {n^{2}}{x^{2}} + \frac {2 \, n \log \left (c x^{n}\right )}{x^{2}}\right )} e - \frac {b^{2} e \log \left (c x^{n}\right )^{2}}{2 \, x^{2}} - \frac {a b n e}{2 \, x^{2}} - \frac {a b e \log \left (c x^{n}\right )}{x^{2}} - \frac {b^{2} d \log \left (c x^{n}\right )^{2}}{3 \, x^{3}} - \frac {2 \, a b d n}{9 \, x^{3}} - \frac {a^{2} e}{2 \, x^{2}} - \frac {2 \, a b d \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac {a^{2} d}{3 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 189, normalized size = 1.73 \begin {gather*} -\frac {8 \, b^{2} d n^{2} + 24 \, a b d n + 36 \, a^{2} d + 27 \, {\left (b^{2} n^{2} + 2 \, a b n + 2 \, a^{2}\right )} x e + 18 \, {\left (3 \, b^{2} x e + 2 \, b^{2} d\right )} \log \left (c\right )^{2} + 18 \, {\left (3 \, b^{2} n^{2} x e + 2 \, b^{2} d n^{2}\right )} \log \left (x\right )^{2} + 6 \, {\left (4 \, b^{2} d n + 12 \, a b d + 9 \, {\left (b^{2} n + 2 \, a b\right )} x e\right )} \log \left (c\right ) + 6 \, {\left (4 \, b^{2} d n^{2} + 12 \, a b d n + 9 \, {\left (b^{2} n^{2} + 2 \, a b n\right )} x e + 6 \, {\left (3 \, b^{2} n x e + 2 \, b^{2} d n\right )} \log \left (c\right )\right )} \log \left (x\right )}{108 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.40, size = 185, normalized size = 1.70 \begin {gather*} - \frac {a^{2} d}{3 x^{3}} - \frac {a^{2} e}{2 x^{2}} - \frac {2 a b d n}{9 x^{3}} - \frac {2 a b d \log {\left (c x^{n} \right )}}{3 x^{3}} - \frac {a b e n}{2 x^{2}} - \frac {a b e \log {\left (c x^{n} \right )}}{x^{2}} - \frac {2 b^{2} d n^{2}}{27 x^{3}} - \frac {2 b^{2} d n \log {\left (c x^{n} \right )}}{9 x^{3}} - \frac {b^{2} d \log {\left (c x^{n} \right )}^{2}}{3 x^{3}} - \frac {b^{2} e n^{2}}{4 x^{2}} - \frac {b^{2} e n \log {\left (c x^{n} \right )}}{2 x^{2}} - \frac {b^{2} e \log {\left (c x^{n} \right )}^{2}}{2 x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 206 vs.
\(2 (100) = 200\).
time = 2.93, size = 206, normalized size = 1.89 \begin {gather*} -\frac {54 \, b^{2} n^{2} x e \log \left (x\right )^{2} + 54 \, b^{2} n^{2} x e \log \left (x\right ) + 108 \, b^{2} n x e \log \left (c\right ) \log \left (x\right ) + 36 \, b^{2} d n^{2} \log \left (x\right )^{2} + 27 \, b^{2} n^{2} x e + 54 \, b^{2} n x e \log \left (c\right ) + 54 \, b^{2} x e \log \left (c\right )^{2} + 24 \, b^{2} d n^{2} \log \left (x\right ) + 108 \, a b n x e \log \left (x\right ) + 72 \, b^{2} d n \log \left (c\right ) \log \left (x\right ) + 8 \, b^{2} d n^{2} + 54 \, a b n x e + 24 \, b^{2} d n \log \left (c\right ) + 108 \, a b x e \log \left (c\right ) + 36 \, b^{2} d \log \left (c\right )^{2} + 72 \, a b d n \log \left (x\right ) + 24 \, a b d n + 54 \, a^{2} x e + 72 \, a b d \log \left (c\right ) + 36 \, a^{2} d}{108 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.79, size = 114, normalized size = 1.05 \begin {gather*} -\frac {x\,\left (9\,e\,a^2+9\,e\,a\,b\,n+\frac {9\,e\,b^2\,n^2}{2}\right )+6\,a^2\,d+\frac {4\,b^2\,d\,n^2}{3}+4\,a\,b\,d\,n}{18\,x^3}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {2\,b\,d\,\left (3\,a+b\,n\right )}{3}+\frac {3\,b\,e\,x\,\left (2\,a+b\,n\right )}{2}\right )}{3\,x^3}-\frac {{\ln \left (c\,x^n\right )}^2\,\left (\frac {b^2\,d}{3}+\frac {b^2\,e\,x}{2}\right )}{x^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________